<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Repositories\MessageRepository;

class InboxController extends Controller
{
    //
	public function __construct(MessageRepository $message)
	{
		$this->middleware('auth');
		$this->message = $message;
	}


	public function index()
	{
		$messages = user()->messages->groupBy('from_user_id');
		//$messages = $this->message->getAllMessages();

		return view('inbox.index', compact('messages'));
	}
}
